// xiaoming
function s0(e) {
  let A = ["apple", "banana", "pear", "orange", "peach"];
  let B1 = [];
  for (let element of A) {
    let a = element.startsWith(e);
    if (a) {
      B1.push(element);
    }
  }
  console.log(B1);
}

//  说明文档 ，
// 传入方法体 入参一个，xx类型，代表xx意思，返回值xx类型，代表什么意思
function s1(e) {
  let A = ["apple", "banana", "pear", "orange", "peach"];
  let B2 = [];
  for (let element of A) {
    //   let a = element.includes("r");
    let a = e(element);

    if (a) {
      B2.push(element);
    }
  }
  console.log(B2);
}

// xiaozhang
// s1();
// s1("e")
// s0()
// s0()
// s0()
// Api说明文档
// s1();
let y2 = function (p) {
  let a = p.includes("r");
  return a;
};
s1(y2);
let y3 = function (p) {
  return p.startsWith("o");
};
s1(y3);

// let y0 = "a";
// s0(y0);
// let y1 = "o";
// s0(y1);
// s0("o");

function t() {
  let a = 3;
  let b = 4;
  m(a, b, 0);
  let e = a - b;
  console.log(e);
}
function m(a, b, c) {
  let d = a + b;
  console.log(d);
}
t();
//zhangsan

function s0(yy) {
  let B1 = [];
  for (let element of A) {
    yy(B1,element);
    // let a = element.startsWith("a");
    // if (a) {
    //   B1.push(element);
    // }
  }
  console.log(B1);
}

//lisi
function tttttt(B1,element){
    let a = element.startsWith("p");
    if (a) {
      B1.push(element);
    }
}
// let s = ;
s0(tttttt(10,"dd"));
s0((B1,element)=>{
    let a = element.startsWith("p");
    if (a) {
      B1.push(element);
    }
})
s0((x,x)=>{
    console.log()
    return x;
})

